<canvas id="canvas" width='500' height="500" style="background:#000">
   <p>you browser not support canvas!<p>
   </canvas>
<script src='../js/utils.js'></script>
<script>
	window.onload = function() {
	var canvas = document.getElementById('canvas'),
		//将canvas传入，该方法会返回一个包含属性x和y的对象
		mouse = utils.captureMouse(canvas);

	//为canvas绑定mousedown事件，当鼠标按下的时候打印出当前鼠标相对于canvas的坐标值
	canvas.addEventListener('mousedown', function(event) {
		console.log("x:" + mouse.x + ",y:" + mouse.y);
	});
</script>